IF(CMAKE_COMPILER_IS_GNUCXX)
    # 从 cmake 2.8.10 开始支持 CMAKE_CXX_COMPILER_VERSION 
    IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4.0)

        MESSAGE(FATAL_ERROR "Insufficient gcc version.")

    ENDIF()

ELSEIF(MSVC)

    # VS2005(14.0.0)
    # 从 cmake 2.8.10 开始支持 CMAKE_CXX_COMPILER_VERSION 
    IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0.0)

        MESSAGE(FATAL_ERROR "Insufficient msvc version.")

    ENDIF()

ELSE()

    MESSAGE(FATAL_ERROR "You are using an unsupported compiler! Compilation has only been tested with GCC and MSVC.")

ENDIF()
